package com.sojson.util.security.shiro.config.shiro;

import org.apache.shiro.spring.LifecycleBeanPostProcessor;
import org.springframework.context.annotation.Bean;

import lombok.extern.slf4j.Slf4j;

/**
 * 有些Bean对象有BUG,不能和某些Bean放一起,就单独提出来了
 * 
 * @author liu
 * @date 2020-08-01
 */
@Slf4j
// @Configuration
public class LifecycleBeanPostProcessorConfig {

    /**
     * Shiro生命周期处理器,因为有bug所以单独放到了这里，如果放到ShiroConfig中会导致ShiroConfig读取不到properties属性
     * 
     * @return
     */
    @Bean
    public LifecycleBeanPostProcessor lifecycleBeanPostProcessor() {
        LifecycleBeanPostProcessor lifecycleBeanPostProcessor = new LifecycleBeanPostProcessor();
        log.info("lifecycleBeanPostProcessor注入成功！");
        return lifecycleBeanPostProcessor;
    }

}